﻿using System;
using System.Collections.Generic;
using BankInvest.InstrumentEditor.Domain.Entities;
using NHibernate;
using NHibernate.Linq;

namespace BankInvest.InstrumentEditor.Domain.Repositories
{
    public class InstrumentTypeRepository : IInstrumentTypeRepository
    {
        private readonly ISession _session;

        public InstrumentTypeRepository(ISession session)
        {
            _session = session;
        }

        public IEnumerable<InstrumentType> GetAll()
        {
            return _session.Query<InstrumentType>();
        }
    }
}